"""
项目基础配置文件
"""
import os

# 项目根目录
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# 数据目录
DATA_DIR = os.path.join(BASE_DIR, 'data')
PROCESSED_DATA_DIR = os.path.join(DATA_DIR, 'processed')

# 日志配置
LOG_LEVEL = 'INFO'
LOG_FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'

# 爬虫配置
USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
REQUEST_TIMEOUT = 10
RETRY_TIMES = 3
DELAY_RANGE = (2, 5)

# ChromeDriver路径（需要根据实际情况修改）
CHROMEDRIVER_PATH = r"D:\chromeDriver\chromedriver-win64\chromedriver.exe"

# 创建必要目录
for dir_path in [DATA_DIR, PROCESSED_DATA_DIR]:
    os.makedirs(dir_path, exist_ok=True)